let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n29,
                    i =
                    (this && this.__extends) ||
                    ((_n29 = function n(t, e) {
                            return (_n29 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n29(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.AwardBoxCom = void 0);
                var r = t('UIComponent'),
                    a = t('ComUtils'),
                    s = t('PlayerMrg'),
                    c = t('AbsInfo'),
                    l = t('UIMrg'),
                    u = t('GainPanel'),
                    h = t('SoundMrg'),
                    p = t('LangCfg'),
                    f = (function(t) {
                        function e(e, o) {
                            var n = t.call(this, e) || this;
                            return (n.data = o), n;
                        }
                        return (
                            i(e, t),
                            (e.prototype.onInit = function() {
                                t.prototype.onInit.call(this),
                                    (this._txtName = a.default.getComponent(
                                        cc.Label,
                                        this.view,
                                        'txtName'
                                    )),
                                    (this._off = a.default.getNode(this.view, 'Background/off')),
                                    (this._on = a.default.getNode(this.view, 'Background/on')),
                                    (this._imgRedDot = a.default.getNode(
                                        this.view,
                                        'Background/imgRedDot'
                                    )),
                                    (this._imgRedDot.active = !1),
                                    s.PlayerMrg.ins.on(
                                        c.InfoEvent.AwardChanged,
                                        this.onAwardChangedHandler,
                                        this
                                    );
                            }),
                            (e.prototype.onLang = function() {
                                this.data &&
                                    (this._txtName.string = p.LangCfg.ins.getContent(200503, {
                                        n: this.data.round
                                    }));
                            }),
                            (e.prototype.onTouchEvenHandler = function(t) {
                                this.enabled &&
                                    t.type == cc.Node.EventType.TOUCH_END &&
                                    (this._isGain &&
                                        (this._isReceive ||
                                            (s.PlayerMrg.ins.receiveChapterAward(this.data.id),
                                                l.UIMrg.show(u.GainPanel, this.data.box))),
                                        h.SoundMrg.click());
                            }),
                            Object.defineProperty(e.prototype, 'data', {
                                get: function get() {
                                    return this._data;
                                },
                                set: function set(t) {
                                    (this._data = t), this.onAwardChangedHandler();
                                },
                                enumerable: !1,
                                configurable: !0
                            }),
                            (e.prototype.onAwardChangedHandler = function() {
                                if (
                                    (this.onLang(),
                                        s.PlayerMrg.ins.maxRound &&
                                        this.data.id <= s.PlayerMrg.ins.maxRound.id)
                                ) {
                                    var t = s.PlayerMrg.ins.getChapterAwardState(this.data.id);
                                    (this._imgRedDot.active = !t),
                                    (this._off.active = !t),
                                    (this._on.active = t),
                                    (this._isReceive = t),
                                    (this._isGain = !0);
                                } else
                                    (this._off.active = !0),
                                    (this._on.active = !1),
                                    (this._isGain = !1),
                                    (this._isReceive = !1),
                                    (this._imgRedDot.active = !1);
                            }),
                            e
                        );
                    })(r.UIComponent);
                (o.AwardBoxCom = f), console.log("end");
            module.exports =  e.exports;